﻿using QLInternet.Components;
using QLInternet.Model;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows.Input;
using QLInternet.Connection;

namespace QLInternet.ViewModel
{
    public class CustomerViewModel : ObservableObject
    {

        private Customer customer = new Customer();
        private String sTT;
        private int tongTienThanhToan;
        private String diaChiCaiDat;
        private String diaChiHoaDon;
        private String tronGoi;
        private String tenKieuCaiDat;
        private String moDem;
        private String goiCuoc;
        private String tenNguoiSuDung;
        private int soLuongTaiKhoan;
        private int tinhTrangSuDung;
        private int maHopDong;

        private String loiKiThuat;

        public String LoiKiThuat
        {
            get { return loiKiThuat; }
            set { loiKiThuat = value; }
        }

        public int MaHopDong
        {
            get { return maHopDong; }
            set { maHopDong = value; }
        }
        public int TinhTrangSuDung
        {
            get { return tinhTrangSuDung; }
            set { tinhTrangSuDung = value; }
        }

        private String tenTinhTrangSuDung;

        public String TenTinhTrangSuDung
        {
            get { return tenTinhTrangSuDung; }
            set { tenTinhTrangSuDung = value; }
        }

        private DateTime ngayBaoLoi;
        private String ngayBaoLoiString;

        public String NgayBaoLoiString
        {
            get { return ngayBaoLoiString; }
            set { ngayBaoLoiString = value; }
        }
        private DateTime ngaySuaLoi;
        private string ngaySuaLoiString;

        private String thongTinLoi; private string ngayDangKy;
        private string loaiPhuongThucDangKy;
        public String ThongTinLoi
        {
            get { return thongTinLoi; }
            set { thongTinLoi = value; }
        }
        private ObservableCollection<Customer> listCustomer = new ObservableCollection<Customer>();

        private int tongSoNgay;

        public int TongSoNgay
        {
            get { return tongSoNgay; }
            set { tongSoNgay = value; }
        }

        private String cachKhacPhuc;

        public String CachKhacPhuc
        {
            get { return cachKhacPhuc; }
            set { cachKhacPhuc = value; }
        }
        public int MaBaoLoi;
        public string NgayDangKy
        {
            get { return ngayDangKy; }
            set { ngayDangKy = value; }
        }
        public string LoaiPhuongThucDangKy
        {
            get { return loaiPhuongThucDangKy; }
            set { loaiPhuongThucDangKy = value; }
        }

        public DateTime NgayBaoLoi
        {

            get { return ngayBaoLoi; }
            set { ngayBaoLoi = value; }
        }
        public string NgaySuaLoiString
        {
            get { return ngaySuaLoiString; }
            set { ngaySuaLoiString = value; }
        }


        public DateTime NgaySuaLoi
        {

            get { return ngaySuaLoi; }
            set { ngaySuaLoi = value; }
        }
        #region properties

        public String TenKieuCaiDat
        {
            get { return tenKieuCaiDat; }
            set { tenKieuCaiDat = value; }
        }

        public String DiaChiHoaDon
        {
            get { return diaChiHoaDon; }
            set { diaChiHoaDon = value; }
        }
        public String DiaChiCaiDat
        {
            get { return diaChiCaiDat; }
            set { diaChiCaiDat = value; }
        }
        public String TenModem
        {
            get { return moDem; }
            set { moDem = value; }
        }

        public String TenGoiCuoc
        {
            get { return goiCuoc; }
            set { goiCuoc = value; }
        }

        public int SoLuongTaiKhoan
        {
            get { return soLuongTaiKhoan; }
            set { soLuongTaiKhoan = value; }
        }

        public String TenNguoiSuDung
        {
            get { return tenNguoiSuDung; }
            set { tenNguoiSuDung = value; }
        }
        public int MaKh
        {
            get { return customer.MaKh; }
            set { customer.MaKh = value; }
        }
        public String Email
        {
            get { return customer.Email; }
            set { customer.Email = value; }
        }
        public String STT
        {
            get { return sTT; }
            set
            {

                if (value != sTT)
                {
                    sTT = value;
                    NotifyPropertyChanged("STT");
                }
            }
        }
        public String HoTen
        {
            get { return customer.HoTen; }
            set
            {

                if (value != customer.HoTen)
                {
                    customer.HoTen = value;
                    NotifyPropertyChanged("HoTen");
                }
            }
        }
        public int CMND
        {
            get { return customer.CMND; }
            set
            {

                if (value != customer.CMND)
                {
                    customer.CMND = value;
                    NotifyPropertyChanged("CMND");
                }
            }
        }
        public String NgheNghiep
        {
            get { return customer.NgheNghiep; }
            set
            {

                if (value != customer.NgheNghiep)
                {
                    customer.NgheNghiep = value;
                    NotifyPropertyChanged("NgheNghiep");
                }
            }
        }

        public String DiaChi
        {
            get { return customer.DiaChi; }
            set
            {

                if (value != customer.DiaChi)
                {
                    customer.DiaChi = value;
                    NotifyPropertyChanged("DiaChi");
                }
            }
        }
        public int DienThoai
        {
            get { return customer.DienThoai; }
            set
            {

                if (value != customer.DienThoai)
                {
                    customer.DienThoai = value;
                    NotifyPropertyChanged("DienThoai");
                }
            }
        }

        public int TongTienThanhToan
        {
            get { return tongTienThanhToan; }
            set
            {

                if (value != tongTienThanhToan)
                {
                    tongTienThanhToan = value;
                    NotifyPropertyChanged("TongTienThanhToan");
                }
            }
        }
        public String TronGoi
        {
            get { return tronGoi; }
            set { tronGoi = value; }
        }

        private String tuNgay;

        public String TuNgay
        {
            get { return tuNgay; }
            set { tuNgay = value; }
        }
        private String denNgay;

        public String DenNgay
        {
            get { return denNgay; }
            set { denNgay = value; }
        }

        private int tongTien;

        public int TongTien
        {
            get { return tongTien; }
            set { tongTien = value; }
        }


        private String tinhTrangThanhToan;

        public String TinhTrangThanhToan
        {
            get { return tinhTrangThanhToan; }
            set { tinhTrangThanhToan = value; }
        }

        #endregion

        #region Command

        //Connect conn;
        //tam thoi chua co command
        public ICommand DSKHTreThanhToanCommand
        {
            get { return new DelegateCommand(GetDSKHTreThanhToan); }
        }

        private void GetDSKHTreThanhToan()
        {

        }

        #endregion

    }
}
